Macromedia Flex Article

Case Study: The Development Life Cycle of a Flex Application


Table of Contents

  1. Introduction
  2. Defining the Team
  3. Application Life Cycle Overview
  4. Setup/Scoping
  5. Analysis
  6. Design
  7. Development/Implementation
  8. Integration
  9. In Closing

Development/Implementation

At this point, the team has a very clear picture what it is building. The team enters this phase knowing the application design, the component definitions, how the app will present data, and the application framework.

Now the team has to build it–building access to data, building the components, developing the server, and some of the client business logic.

The server developer implements the façade created in the design phase. The server developer must ensure that the application can access and present the data according to the façade description. If the server programmer deviates from using the planned façade, he should let the client programmer know immediately.

Next, the client programmer builds the application components. The client programmer will usually build business logic in the components; however reusing code should be paramount in coding decisions. Thus, the more generalized the components are, the better.

A client programmer must decide how to build the components, whether to use MXML and ActionScript (for building Flex components), or use Macromedia Flash MX 2004 to build a SWC file. There are many reasons why a client programmer might use one technique over the other. If the team has lots of Flash experience, using Flash MX 2004 is an easier way to build the components. However, there are times where it is easier to visually build a component, rather than building it all in code. For instance, on the WHITTMANHART project, creating a three-dimensional bar chart (Figure 5) was easier to build visually, through Flash, than through MXML and ActionScript.

Three-dimensional chart built in Flash MX 2004

(+) View Larger

Figure 5. Three-dimensional chart built in Flash MX 2004.

In this application, a user clicks the “Forecast,” or yellow row, setting the alpha of the “Actual” and “Plan” (the red/green and red) rows around 10%; after which, the chart shows the hidden data.

For WHITTMANHART, we also built highly reusable MXML components. The "At a glance” bar in Figure 6 is an example of a highly reuseable MXML component.

The 'At a glance' bar is a highly reusable MXML component

Figure 6. The "At a glance" bar is a highly reusable MXML component.

The "At a glance" bar (Figure 6) displays data trends. Our client developer built this component using Macromedia Flex, using MXML for the layout, behaviors, and interactions; and using ActionScript for some of the associated functions. Each graph in the bar is an instance of the same component, each pulling data from different data sources, for a total of five component instances.

Flex is very powerful in that it allows the team to leverage the skills that are available on the team. You can use both Flash MX 2004 (existing S WF files) and/or MXML and ActionScript to define the application components.

The designer is very busy during the early phases of the development and implementation phase. Throughout the entire life cycle of the application, the designer works on the component skins. The team develops the wire frames into a completed snapshot of the finished application, as we did with the WHITTMANHART application.

The completed WHITTMANHART application

Figure 7. The completed WHITTMANHART application.

Flex provides developers and designers with a complete set of components, that they can use to build their own components. If a designer uses the standard component skin that comes with Flex, it will save the client developer development time. Using the standard skin will mean that the client developer can simply modify the components styles (such as font properties, dimensions, colors, and so forth), instead of having to reskin the components. Skinning can be a very intensive process, but sometimes it is a necessity. On the WHITTMANHART project, we implemented a tab control so that users could switch between the view in Figure 7 and a view to some Cognos reports. Since we wanted the tabs to have the same feel as the rest of the application, it meant that we had to completely change the skin on the standard tab component that came with Flex. While this involved some work, we were able to modify the standard Flex component, so we didn’t have to reinvent the wheel and build our own component from scratch. Flex provides teams with configurable components and assets that they can leverage and modify to fit the unique needs of any project.

As this development/implementation phase progresses, the server programmer locks down the data access methods, which enables the client programmer to begin binding the components to the data.

At the end of this phase, the team has created a working model for accessing data, the finalized skin for the application, and all of the components of the applications.